package com.huluobo.a2204kotlinshopping

import android.app.Application
import com.huluobo.base.db.AppDBUtils
import com.hyphenate.chat.EMClient
import com.hyphenate.chat.EMOptions
import com.hyphenate.easeui.EaseIM

/**
 *  Created by LC on 2024/7/26.
 */
class App : Application() {
    override fun onCreate() {
        super.onCreate()
        AppDBUtils.init(this)

        val options = EMOptions()
        options.appKey = "moroks#2203kotlinshoppingdemo";

        //EaseIM 初始化
        if (EaseIM.getInstance().init(this, options)) {
            //在做打包混淆时，关闭 debug 模式，避免消耗不必要的资源
            EMClient.getInstance().setDebugMode(true)
            //EaseIM 初始化成功之后再调用注册消息监听的代码 ...
        }
    }
}